package com.neusoft.hifly.push.email.auth;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * Title: 核心类库
 * <p>
 * Description: 邮件认证
 * <p>
 * Copyright: 2019
 * <p>
 * Company: 东软汉枫
 *
 * @author lh_neu
 * @version 1.0.0
 */
public class MyAuthenticator extends Authenticator {
	String userName = null;
	String password = null;

	public MyAuthenticator() {
	}

	public MyAuthenticator(final String username, final String password) {
		this.userName = username;
		this.password = password;
	}

	@Override
	protected PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(userName, password);
	}
}
